using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._PairwiseOverlay
{
    /// <summary>
    /// <para>Pairwise Integrate</para>
    /// <para>Analyzes the coordinate locations of feature vertices among features in one or more feature classes. Those that fall within a specified distance of one another are assumed to represent the same location and are assigned a common coordinate value (in other words, they are colocated). The tool also adds vertices where feature vertices are within the x,y tolerance of an edge and where line segments intersect.</para>
    /// <para>分析一个或多个要素类中要素之间的要素折点的坐标位置。假定它们彼此位于指定距离内，表示相同的位置，并被分配一个公共坐标值（换句话说，它们是共置的）。该工具还会添加要素折点在边的 x，y 容差范围内且线段相交的折点。</para>
    /// </summary>    
    [DisplayName("Pairwise Integrate")]
    public class PairwiseIntegrate : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PairwiseIntegrate()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The feature classes to be integrated. When the distance between features is small in comparison to the tolerance, the vertices or points will be clustered (moved to be coincident).</para>
        /// <para>要集成的要素类。当要素之间的距离与容差相比较小时，折点或点将被聚类（移动以重合）。</para>
        /// </param>
        public PairwiseIntegrate(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Pairwise Integrate";

        public override string CallName => "analysis.PairwiseIntegrate";

        public override List<string> AcceptEnvironments => ["XYTolerance", "extent", "parallelProcessingFactor", "workspace"];

        public override object[] ParameterInfo => [_in_features, _cluster_tolerance, _out_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature classes to be integrated. When the distance between features is small in comparison to the tolerance, the vertices or points will be clustered (moved to be coincident).</para>
        /// <para>要集成的要素类。当要素之间的距离与容差相比较小时，折点或点将被聚类（移动以重合）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The distance that determines the range in which feature vertices are made coincident. To minimize undesired movement of vertices, the x,y tolerance should be fairly small. If no value is specified, the xy tolerance from the first dataset in the list of inputs will be used.</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定要素折点重合范围的距离。为了尽量减少顶点的意外移动，x，y 容差应相当小。如果未指定任何值，则将使用输入列表中第一个数据集的 xy 容差。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cluster_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _out_features { get; set; }


        public PairwiseIntegrate SetEnv(object XYTolerance = null, object extent = null, object parallelProcessingFactor = null, object workspace = null)
        {
            base.SetEnv(XYTolerance: XYTolerance, extent: extent, parallelProcessingFactor: parallelProcessingFactor, workspace: workspace);
            return this;
        }

    }

}